import request from "../utils/request"
// 用户管理
export function user_control(searchPara) {
    return request({
        url: '/admin/list',
        method: 'post',
        data: searchPara
    })
}
// 新增用户
export function user_register(increased) {
    return request({
        url: '/admin/register',
        method: 'post',
        data: increased
    })
}
// 删除用户
export function user_cancel(cancel) {
    return request({
        url: '/admin/delete',
        method: 'post',
        data: cancel
    })
}
// 获取编辑的用户信息
export function user_getbyid(compile) {
    return request({
        url: '/admin/getbyid',
        method: 'post',
        data: compile
    })
}
// 编辑用户
export function user_update(editor) {
    return request({
        url: '/admin/update',
        method: 'post',
        data: editor
    })
}
// 二级管理员测试(角色管理)
export function secondary() {
    return request({
        url: '/role/list',
        method: 'GET'
    })
}
// 批量删除数据
export function batchdelete(batch) {
    return request({
        url: '/role/delete',
        method: 'post',
        data: batch
    })
}
// 新增用户权限
export function batchdcreate(create) {
    return request({
        url: '/role/create',
        method: 'post',
        data: create
    })
}
// 用描述查询用户角色
export function batchdselect(select) {
    return request({
        url: '/role/select',
        method: 'post',
        data: select
    })
}
// 获取编辑角色的信息
export function partgetbyid(part) {
    return request({
        url: '/admin/role/getRoleList',
        method: 'post',
        data: part
    })
}
// 编辑用户权限信息
export function batchdupdate(account) {
    return request({
        url: '/role/update',
        method: 'post',
        data: account
    })
}
// 获取当前角色的权限
export function batchdsearch(seek) {
    return request({
        url: '/role/permission',
        method: 'post',
        data: seek
    })
}
// 用户权限修改
export function modification(authority) {
    return request({
        url: '/role/permission/update',
        method: "post",
        data: authority
    })
}
// 公司管理表单数据接口
export function company() {
    return request({
        url: '/permission/treeList',
        method: 'GET'
    })
}
// 权限管理
export function management(paging) {
    return request({
        url: '/permission/list',
        method: 'post',
        data: paging
    })
}
// 所有权限
export function managementop() {
    return request({
        url: '/permission/listNoPage',
        method: 'post',
    })
}
// 新增所有权限
export function additroles(addroles) {
    return request({
        url: '/permission/create',
        method: 'post',
        data: addroles
    })
}
// 批量删除权限
export function permissionsdelete(permissiondelete) {
    return request({
        url: '/permission/delete',
        method: 'post',
        data: permissiondelete
    })
}
// 所有角色
export function character(rolest) {
    return request({
        url: '/admin/role/updatelistAll',
        method: 'post',
        data: rolest
    })
}
// 角色的分配
export function roleassignment(assignment) {
    return request({
        url: '/admin/role/update',
        method: 'post',
        data: assignment
    })
}
// 修改用户密码
export function changepassword(pawd) {
    return request({
        url: '/admin/role/updatePass',
        method: 'post',
        data: pawd
    })
}
// 获取用户已有的权限
export function getRoleList(rolelist) {
    return request({
        url: '/admin/role/getRoleList',
        method: 'post',
        data: rolelist
    })
}